# library(BiocManager)
# BiocManager::install("DESeq2")
library(dplyr)
Attaching package: ‘dplyr’
The following object is masked from ‘package:Biobase’:
combine
The following objects are masked from ‘package:BiocGenerics’:
combine, intersect, setdiff, union
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
library(readr)
library(DESeq2)
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: ‘S4Vectors’
The following objects are masked from ‘package:dplyr’:
first, rename
The following objects are masked from ‘package:base’:
expand.grid, I, unname
Loading required package: IRanges
Attaching package: ‘IRanges’
The following objects are masked from ‘package:dplyr’:
collapse, desc, slice
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats
Attaching package: ‘matrixStats’
The following object is masked from ‘package:dplyr’:
count
The following objects are masked from ‘package:Biobase’:
anyMissing, rowMedians
Attaching package: ‘MatrixGenerics’
The following objects are masked from ‘package:matrixStats’:
colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse, colCounts, colCummaxs, colCummins, colCumprods,
colCumsums, colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs, colMads, colMaxs, colMeans2, colMedians,
colMins, colOrderStats, colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds, colSums2, colTabulates,
colVarDiffs, colVars, colWeightedMads, colWeightedMeans, colWeightedMedians, colWeightedSds, colWeightedVars,
rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet, rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps, rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians,
rowMins, rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks, rowSdDiffs, rowSds, rowSums2, rowTabulates,
rowVarDiffs, rowVars, rowWeightedMads, rowWeightedMeans, rowWeightedMedians, rowWeightedSds, rowWeightedVars
The following object is masked from ‘package:Biobase’:
rowMedians
library(readr)
gene_data <- read_csv('Breast_GSE45827.csv')
Rows: 151 Columns: 54677
── Column specification ─────────────────────────────────────────────
Delimiter: ","
chr (1): type
dbl (54676): samples, 1007_s_at, 1053_at, 117_at, 121_at, 1255_g_...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(gene_data)
binary_class_data <- gene_data %>%
mutate(type = case_when(
type == 'normal' ~ 'healthy',
TRUE ~ 'cancer'
)
)
binary_class_data
binary_class_data <- as.data.frame(t(binary_class_data))
head(binary_class_data)
colnames(binary_class_data) <- binary_class_data[1,]
coldata <- as.data.frame(t(binary_class_data[c(2),]))
binary_class_data <- binary_class_data[-c(1,2),]
binary_class_data
coldata
converted_binary <- type.convert(binary_class_data)
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
Warning in type.convert.default(x[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
converted_binary
has.neg <- apply(converted_binary, 1, function(row) any(row < 0))
which(has.neg)
named integer(0)
dds <- DESeqDataSetFromMatrix(countData = converted_binary,
colData = coldata,
design = ~ type)
Error in DESeqDataSet(se, design = design, ignoreRank) :
some values in assay are not integers
library(affy)
Loading required package: BiocGenerics
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind,
colnames, dirname, do.call, duplicated, eval, evalq,
Filter, Find, get, grep, grepl, intersect, is.unsorted,
lapply, Map, mapply, match, mget, order, paste, pmax,
pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce,
rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit, which.max, which.min
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages
'citation("pkgname")'.
gene_raw_data <- ReadAffy(celfile.path = "/Users/alex/Documents/GitHub/Breast-Cancer-Gene-Regulatory-Network-and-Risk-Prediction/GSE45827_RAW/")
assay_data <- assayData(gene_raw_data)$exprs
pheno_data <- phenoData(gene_raw_data)
feature_data <- featureData(gene_raw_data)
arraysRMA = rma(gene_raw_data, normalize = FALSE)
Background correcting
Calculating Expression
log_arraysRMAtable=exprs(arraysRMA)
count_table = as.data.frame(round(2^log_arraysRMAtable))
head(count_table)
colnames(count_table) <- substr(colnames(count_table),8,10)
head(count_table)
count_table <- count_table[-c(3,6,8,10,13,16,19,24,28,31,34,36,42,48,50,52,54,57,62,71,76,82,90)]
count_table
colnames(count_table) <- as.integer(colnames(count_table))
count_table
coldata <- as.data.frame(as.integer(colnames(count_table)))
colnames(coldata) <- 'Sample'
coldata <- coldata %>%
mutate(type = case_when(
Sample > 168 & Sample < 180 ~ 'non-cancer',
TRUE ~ 'cancer'
)
)
coldata
dds <- DESeqDataSetFromMatrix(countData = count_table,
colData = coldata,
design = ~ type)
converting counts to integer mode
Warning in DESeqDataSet(se, design = design, ignoreRank) :
some variables in design formula are characters, converting to factors
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
dds
class: DESeqDataSet
dim: 54675 155
metadata(1): version
assays(1): counts
rownames(54675): 1007_s_at 1053_at ... AFFX-TrpnX-5_at AFFX-TrpnX-M_at
rowData names(0):
colnames(155): 84 85 ... 237 238
colData names(2): Sample type
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
dds$type <- relevel(dds$type, ref = "non-cancer")
dds <- DESeq(dds)
estimating size factors
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
-- note: fitType='parametric', but the dispersion trend was not well captured by the
function: y = a/x + b, and a local regression fit was automatically substituted.
specify fitType='local' or 'mean' to avoid this message next time.
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
final dispersion estimates
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
fitting model and testing
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
-- replacing outliers and refitting for 1490 genes
-- DESeq argument 'minReplicatesForReplace' = 7
-- original counts are preserved in counts(dds)
estimating dispersions
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
fitting model and testing
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
res <- results(dds)
res
log2 fold change (MLE): type cancer vs non.cancer
Wald test p-value: type cancer vs non.cancer
DataFrame with 54675 rows and 6 columns
baseMean log2FoldChange lfcSE stat pvalue padj
<numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
1007_s_at 1334.51058 0.8123694 0.181887 4.466330 7.95728e-06 3.94795e-05
1053_at 230.07337 1.9688682 0.239366 8.225336 1.94644e-16 4.16361e-15
117_at 83.06795 1.0857221 0.225627 4.812026 1.49408e-06 8.36205e-06
121_at 162.55550 0.0649612 0.112490 0.577483 5.63614e-01 6.48285e-01
1255_g_at 9.24762 -0.2263988 0.186028 -1.217014 2.23599e-01 3.12482e-01
... ... ... ... ... ... ...
AFFX-ThrX-5_at 60.56504 0.808219 0.279738 2.889203 0.0038622 0.0109982
AFFX-ThrX-M_at 88.90409 0.311917 0.299819 1.040351 0.2981768 0.3923002
AFFX-TrpnX-3_at 7.66778 -0.218986 0.205893 -1.063588 0.2875156 0.3813199
AFFX-TrpnX-5_at 12.18044 -0.107204 0.168421 -0.636526 0.5244335 0.6130332
AFFX-TrpnX-M_at 9.10146 -0.287742 0.184936 -1.555899 0.1197322 0.1899917
resultsNames(dds)
[1] "Intercept" "type_cancer_vs_non.cancer"
# Log Fold Change Shrink
resLFC <- lfcShrink(dds, coef="type_cancer_vs_non.cancer", type="apeglm")
using 'apeglm' for LFC shrinkage. If used in published research, please cite:
Zhu, A., Ibrahim, J.G., Love, M.I. (2018) Heavy-tailed prior distributions for
sequence count data: removing the noise and preserving large differences.
Bioinformatics. https://doi.org/10.1093/bioinformatics/bty895
resLFC
log2 fold change (MAP): type cancer vs non.cancer
Wald test p-value: type cancer vs non.cancer
DataFrame with 54675 rows and 5 columns
baseMean log2FoldChange lfcSE pvalue padj
<numeric> <numeric> <numeric> <numeric> <numeric>
1007_s_at 1334.51058 0.7713287 0.183864 7.95728e-06 3.94795e-05
1053_at 230.07337 1.9180309 0.243838 1.94644e-16 4.16361e-15
117_at 83.06795 1.0235148 0.229779 1.49408e-06 8.36205e-06
121_at 162.55550 0.0629059 0.110514 5.63614e-01 6.48285e-01
1255_g_at 9.24762 -0.2056307 0.179211 2.23599e-01 3.12482e-01
... ... ... ... ... ...
AFFX-ThrX-5_at 60.56504 0.7095392 0.282451 0.0038622 0.0109982
AFFX-ThrX-M_at 88.90409 0.2479490 0.274935 0.2981768 0.3923002
AFFX-TrpnX-3_at 7.66778 -0.1938796 0.196496 0.2875156 0.3813199
AFFX-TrpnX-5_at 12.18044 -0.0980537 0.162032 0.5244335 0.6130332
AFFX-TrpnX-M_at 9.10146 -0.2642140 0.179266 0.1197322 0.1899917
resOrdered <- res[order(res$pvalue),]
resOrdered
log2 fold change (MLE): type cancer vs non.cancer
Wald test p-value: type cancer vs non.cancer
DataFrame with 54675 rows and 6 columns
baseMean log2FoldChange lfcSE stat pvalue padj
<numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
243689_s_at 25.9957 -3.89543 0.139157 -27.9930 1.97637e-172 1.08058e-167
224012_at 17.1237 -3.14268 0.129003 -24.3614 4.38935e-131 1.19994e-126
207092_at 85.7769 -5.70338 0.236180 -24.1484 7.75292e-129 1.41297e-124
211565_at 34.8702 -3.25637 0.136013 -23.9416 1.13155e-126 1.54669e-122
1552509_a_at 27.1727 -4.41723 0.185255 -23.8441 1.16619e-125 1.27523e-121
... ... ... ... ... ... ...
215244_at 22.8869 5.79663e-05 0.1330159 4.35785e-04 0.999652 0.999725
216200_at 14.0919 -4.95852e-05 0.1628031 -3.04572e-04 0.999757 0.999812
205735_s_at 18.0396 4.60511e-05 0.1960345 2.34913e-04 0.999813 0.999849
1553701_a_at 82.9793 -1.54787e-05 0.0804177 -1.92479e-04 0.999846 0.999865
1555629_at 22.8510 -1.39734e-05 0.1515850 -9.21817e-05 0.999926 0.999926
LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3J9CiMgbGlicmFyeShCaW9jTWFuYWdlcikKIyBCaW9jTWFuYWdlcjo6aW5zdGFsbCgiREVTZXEyIikKbGlicmFyeShkcGx5cikKbGlicmFyeShyZWFkcikKbGlicmFyeShERVNlcTIpCmBgYAoKYGBge3J9CmdlbmVfZGF0YSA8LSByZWFkX2NzdignQnJlYXN0X0dTRTQ1ODI3LmNzdicpCmhlYWQoZ2VuZV9kYXRhKQpgYGAKCmBgYHtyfQpiaW5hcnlfY2xhc3NfZGF0YSA8LSBnZW5lX2RhdGEgJT4lIAogIG11dGF0ZSh0eXBlID0gY2FzZV93aGVuKAogICAgdHlwZSA9PSAnbm9ybWFsJyB+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